﻿namespace LM.Repositorios.Maps
{
    using LM.Negocio.Objetos;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.ModelConfiguration;

    public class MarcaMap : EntityTypeConfiguration<Marca>
    {
        public MarcaMap()
        {
            this.HasKey(m => m.Id);
            this.Property(m => m.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("Id");
            this.Property(m => m.Codigo).HasColumnName("Codigo").IsRequired();
            this.Property(m => m.Descricao).HasColumnName("Descricao").IsRequired().HasMaxLength(100);

            this.ToTable("MARCA");
        }
    }
}
